//Source file: D:\\test\\com\\ce\\pms\\charge\\model\\NoteDomain.java

package com.ce.pms.charge.model;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;

import com.ce.pms.common.model.SysInfo;
import com.ce.pms.customer.model.ProRightDO;
import com.ce.pms.house.model.ChargePrecinctDomain;
import com.ce.pms.house.model.HouseDomain;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称:通知单 关联数据表:FEE_NOTE
 *
 * @author yandawei
 * @CreateDate:2008-7-14
 */
@Entity
@Table(name = "FEE_NOTE")
public class NoteDomain implements IDomainObject {

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue
	@Column(name = "NOTE_ID")
	private Long noteId;

	/**
	 * 收费管理区
	 */
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "CHARGE_PRECINCT_ID")
	private ChargePrecinctDomain chargePrecint;

	/**
	 * 房屋
	 */
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "HOUSE_ID")
	private HouseDomain house;

	/**
	 * 产权
	 */
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PRO_RIGHT_ID")
	private ProRightDO proRight;

	/**
	 * 业主
	 */
	@Column(name = "CLIENTS", length = 100, nullable = false)
	private String clients;

	/**
	 * 通知单号
	 */
	@Column(name = "REQUISITION_NUM", length = 50, nullable = false)
	private String requisitionNum;

	/**
	 * 打印时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LAST_PRINT_TIME")
	private Date lastPrintTime;

	/**
	 * 银行托收帐号
	 */
	@Column(name = "ACC_NUMBER", length = 20)
	private String accNumber;

	/**
	 * 收费周期
	 */
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PERIOD_ID")
	private PeriodDomain period;

	/**
	 * 房号
	 */
	@Column(name = "HOUSE_NUMBER", length = 36)
	private String houseNumber;

	/**
	 * 面积
	 */
	@Column(name = "HOUSE_SIZE", precision = 12, scale = 2)
	private BigDecimal houseSize = new BigDecimal("0.00");

	/**
	 * 打印次数
	 */
	@Column(name = "PRINT_TIMES")
	private Short printTimes;

	/**
	 * 本月金额合计
	 */
	@Column(name = "THIS_AMT_SUM", precision = 18, scale = 2)
	private BigDecimal thisAmtSum = new BigDecimal("0.00");

	/**
	 * 往月欠款合计
	 */
	@Column(name = "OLD_AMT_SUM", precision = 18, scale = 2)
	private BigDecimal oldAmtSum = new BigDecimal("0.00");



	/**
	 * 应收合计
	 */
	@Column(name = "TOTAL_AMT", precision = 18, scale = 2)
	private BigDecimal totalAmt;

	/**
	 * 是否有效 1有效;0无效
	 */
	@Column(name = "VALIDITY", length = 1, nullable = false)
	private String validity;

	/**
	 * 通知单明细
	 */
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "note")
	private Set<TransRNote> transRnotes = new HashSet<TransRNote>();

	/**
	 * 是否催缴单
	 */
	@Column(name ="REMINDER", length=1)
	private String reminder;

	@Embedded
	private SysInfo sysInfo;

	/**
	 * @roseuid 48757D15001F
	 */
	public NoteDomain() {

	}

	/**
	 * mini constructor
	 *
	 * @param chargePrecint
	 *            收费管理区
	 * @param house
	 *            房屋
	 * @param proRight
	 *            产权
	 * @param clients
	 *            业主、租户
	 * @param requisitionNum通知单号
	 * @param perion
	 *            收费周期
	 * @param sysInfo
	 *            系统信息
	 */
	public NoteDomain(ChargePrecinctDomain chargePrecint, HouseDomain house,
			ProRightDO proRight, String clients, String requisitionNum,
			PeriodDomain perion, SysInfo sysInfo) {
		this.chargePrecint = chargePrecint;
		this.house = house;
		this.proRight = proRight;
		this.clients = clients;
		this.requisitionNum = requisitionNum;
		this.period = perion;
		this.sysInfo = sysInfo;
	}

	public String getAccNumber() {
		return accNumber;
	}

	public void setAccNumber(String accNumber) {
		this.accNumber = accNumber;
	}

	public ChargePrecinctDomain getChargePrecint() {
		return chargePrecint;
	}

	public void setChargePrecint(ChargePrecinctDomain chargePrecint) {
		this.chargePrecint = chargePrecint;
	}

	public String getClients() {
		return clients;
	}

	public void setClients(String clients) {
		this.clients = clients;
	}

	public HouseDomain getHouse() {
		return house;
	}

	public void setHouse(HouseDomain house) {
		this.house = house;
	}

	public Long getNoteId() {
		return noteId;
	}

	public void setNoteId(Long noteId) {
		this.noteId = noteId;
	}

	public PeriodDomain getPeriod() {
		return period;
	}

	public void setPeriod(PeriodDomain perion) {
		this.period = perion;
	}



	public ProRightDO getProRight() {
		return proRight;
	}

	public void setProRight(ProRightDO proRight) {
		this.proRight = proRight;
	}

	public String getRequisitionNum() {
		return requisitionNum;
	}

	public void setRequisitionNum(String requisitionNum) {
		this.requisitionNum = requisitionNum;
	}

	public Set<TransRNote> getTransRnotes() {
		return transRnotes;
	}

	public void setTransRnotes(Set<TransRNote> transRnotes) {
		this.transRnotes = transRnotes;
	}

	public String getHouseNumber() {
		return houseNumber;
	}

	public void setHouseNumber(String houseNumber) {
		this.houseNumber = houseNumber;
	}

	public BigDecimal getHouseSize() {
		return houseSize;
	}

	public void setHouseSize(BigDecimal houseSize) {
		this.houseSize = houseSize;
	}

	public Date getLastPrintTime() {
		return lastPrintTime;
	}

	public void setLastPrintTime(Date lastPrintTime) {
		this.lastPrintTime = lastPrintTime;
	}

	public BigDecimal getOldAmtSum() {
		return oldAmtSum;
	}

	public void setOldAmtSum(BigDecimal oldAmtSum) {
		this.oldAmtSum = oldAmtSum;
	}

	public Short getPrintTimes() {
		return printTimes;
	}

	public void setPrintTimes(Short printTimes) {
		this.printTimes = printTimes;
	}

	public SysInfo getSysInfo() {
		return sysInfo;
	}

	public void setSysInfo(SysInfo sysInfo) {
		this.sysInfo = sysInfo;
	}

	public BigDecimal getThisAmtSum() {
		return thisAmtSum;
	}

	public void setThisAmtSum(BigDecimal thisAmtSum) {
		this.thisAmtSum = thisAmtSum;
	}

	public BigDecimal getTotalAmt() {
		return totalAmt;
	}

	public void setTotalAmt(BigDecimal totalAmt) {
		this.totalAmt = totalAmt;
	}

	public String getValidity() {
		return validity;
	}

	public void setValidity(String validity) {
		this.validity = validity;
	}

	public String getReminder() {
		return reminder;
	}

	public void setReminder(String reminder) {
		this.reminder = reminder;
	}


}
